fix: prompt provision after connection init - #9679
Merged
Merged
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 20 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 20 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds post-init provisioning guidance when connection services are written.
Changes:
- Counts emitted connection services and records a pending-provision reason.
- Preserves existing best-effort signal handling.
- Adds unit coverage for counting, signaling, and next-step resolution.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
resource_services.go |
Returns the emitted connection count. |
resource_services_test.go |
Tests connection counting and skipped names. |
pending_provision.go |
Adds the connection pending reason and recorder. |
pending_provision_test.go |
Tests signal persistence and sorting. |
nextstep/resolver_test.go |
Verifies connections trigger provisioning guidance. |
init.go |
Records the reason after successful resource emission. |
init_from_code.go |
Adapts to the updated return signature. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Travis Angevine (trangevi)
approved these changes
Aug 21, 2026
Member
Author
|
/check-enforcer override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this is needed
When
azd ai agent initadds a standaloneazure.ai.connection, users still need to runazd provision. Init should only record a pending connection when it actually writes the connection service. That avoids recording one when an invalid service name causes the service to be skipped.Why this approach
emitResourceServicesnow reports how many connection services it wrote. Init recordsconnectiononly when that count is greater than zero and the signal update succeeds. If updating the signal fails, init logs a warning and continues. A later init without connection input leaves existing reasons alone. Existing reason sorting and deduplication, provision-first guidance, and cleanup after successful provision are unchanged.Remote connection validation and the provisioning implementation are out of scope for this PR.
Validation
go test ./internal/cmd/...git diff --checkE2E validation
azd ai agent initwith a valid connection manifest: PASS. It wrote the connection service, addedconnectionto the pending-provision signal, and completed successfully.azd ai agent init: PASS. TheNext:section includedazd provisionandazd deploy.azd ai agent initwithout connection input: PASS. The existing pending-provision signal stayed unchanged.azd ai agent initwith a blank connection service name: PASS. It warned, skipped the connection, and did not addconnectionto the signal.azd ai agent initusing local code: PASS. The from-code path completed through the shared resource-service code.Closes: #9685